home *** CD-ROM | disk | FTP | other *** search
/ The Best of MacTutor - S…e Code for Volumes 1 to 5 / The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin / Source Code / #49 (Oct 89) / DMP Source / src / DMP-110.rsrc.r < prev    next >
Text File  |  1989-01-02  |  13KB  |  640 lines

  1. /*
  2.  * The contents of a Macintosh Printer Resource File can be found
  3.  * in the Print Manager Chapter of Inside Macintosh, if you can
  4.  * get it.
  5.  */
  6. /*
  7.  * This file is part of the DMP-110 printer driver for the Macintosh
  8.  * series of computers.
  9.  */
  10. /*
  11.  * Earle R. Horton.
  12.  * Wednesday, November 30, 1988
  13.  * All rights reserved.
  14.  */
  15. #include "Types.r"
  16. /* This file's creator. */
  17.  
  18. #define Version "DMP-110 v1.0"
  19.  
  20. type 'Dmp1' {
  21.         pstring;        /* String */
  22. };
  23.  
  24. /* Print record resource file copy. */
  25.  
  26. type 'PREC' {
  27.     integer ;       /* version */
  28.  
  29.                 /* prInfo */
  30.         byte;
  31.         byte;           /* iDev */
  32.         integer ;       /* iVres */
  33.         integer ;       /* iHres */
  34.         rect    ;       /* rPage */
  35.  
  36.     rect    ;       /* rPaper */
  37.                 /* prStl */
  38.         integer ;       /* wDev */
  39.         integer ;       /* iPageV */
  40.         integer ;       /* iPageH */
  41.         byte    ;       /* bPort */
  42.         byte    ;       /* feed */
  43.  
  44.                 /* prInfoPT */
  45.         byte;
  46.         byte;           /* iDev */
  47.         integer ;       /* iVres */
  48.         integer ;       /* iHres */
  49.         rect    ;       /* rPage */
  50.                 /* prXInfo */
  51.         integer ;       /* iRowBytes */
  52.         integer ;       /* iBandV */
  53.         integer ;       /* iBandH */
  54.         integer ;       /* iDevBytes */
  55.         integer ;       /* iBands */
  56.         byte ;          /* bPatScale */
  57.         byte ;          /* bUlThick */
  58.         byte ;          /* bUlOffset */
  59.         byte ;          /* bUlShadow */
  60.         byte ;          /* scan */
  61.         byte ;          /* bXInfoX */
  62.                 /* prJob */
  63.         integer ;       /* iFstPage */
  64.         integer ;       /* iLstPage */
  65.         integer ;       /* iCopies */
  66.         byte ;          /* bJDocLoop */
  67.         byte ;          /* fFromUsr */
  68.         longint ;       /* pIdleProc */
  69.         longint ;       /* pFileName */
  70.         integer ;       /* iFileVol */
  71.         byte ;          /* bFileVers */
  72.         byte ;          /* bJobX */
  73.  
  74.     array   [19]{       /* "Private" */
  75.         integer;
  76.     };
  77. };
  78.  
  79. resource 'ICN#' (128, "DMP-110") {
  80.     {   /* array: 2 elements */
  81.         /* [1] */
  82.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  83.         $"0000 0000 0000 0000 0000 0000 007F 8000"
  84.         $"0040 C000 0040 A000 0040 9000 0040 F800"
  85.         $"0040 0800 0040 0800 0040 0800 0040 0800"
  86.         $"0040 0800 0040 0800 03FF FFC0 04AA AC20"
  87.         $"04D5 55A0 04AA ADA0 027F F840 0200 0040"
  88.         $"01FF FF80 0008 0400 0008 0400 0008 0400"
  89.         $"1E08 0E00 1FF0 1F00 1E00 1F00 0000 0A",
  90.         /* [2] */
  91.         $"0000 0000 0000 0000 0000 0000 0000 0000"
  92.         $"0000 0000 0000 0000 0000 0000 007F 8000"
  93.         $"007F C000 007F E000 007F F000 007F F800"
  94.         $"007F F800 007F F800 007F F800 007F F800"
  95.         $"007F F800 007F F800 03FF FFC0 07FF FFE0"
  96.         $"07FF FFE0 07FF FFE0 03FF FFC0 03FF FFC0"
  97.         $"01FF FF80 0008 0400 0008 0400 0008 0400"
  98.         $"1E08 0E00 1FF0 1F00 1E00 1F00 0000 0A"
  99.     }
  100. };
  101.  
  102. resource 'FREF' (128) {
  103.     'PRER',
  104.     0,
  105.     ""
  106. };
  107.  
  108. resource 'Dmp1' (0) {
  109.     Version
  110. };
  111.  
  112. resource 'BNDL' (128) {
  113.     'Dmp1',
  114.     0,
  115.     {
  116.         'ICN#',
  117.         {
  118.             0, 128
  119.         },
  120.         'FREF',
  121.         {
  122.             0, 128
  123.         }
  124.     }
  125. };
  126.  
  127. data 'HEXA' (-8192, "Printer Settings") {
  128.     $"0001 0002 0000 "
  129. };
  130.  
  131. resource 'STR ' (-4092, "Right Button") {
  132.     "Modem"
  133. };
  134.  
  135. resource 'STR ' (-4093, "Left Button") {
  136.     "Printer"
  137. };
  138.  
  139. resource 'STR ' (-4091, "List label") {
  140.     "Select Speed and Click on a Port."
  141. };
  142.  
  143. resource 'STR ' (-8191, "Spool File Name") {
  144.     "Print File"
  145. };
  146.  
  147. resource 'DITL' (-8191,"Job dialog tempplate") {
  148.     {
  149.         {8, 321, 28, 381},
  150.         Button {
  151.             enabled,
  152.             "OK"
  153.         },
  154.         {9, 395, 29, 455},
  155.         Button {
  156.             enabled,
  157.             "Cancel"
  158.         },
  159.         {6, 6, 23, 127},
  160.         StaticText {
  161.             disabled,
  162.             Version
  163.         },
  164.         {30, 5, 46, 89},
  165.         StaticText {
  166.             disabled,
  167.             "Page Range:"
  168.         },
  169.         {30, 93, 45, 138},
  170.         RadioButton {
  171.             enabled,
  172.             "All"
  173.         },
  174.         {30, 140, 46, 200},
  175.         RadioButton {
  176.             enabled,
  177.             "From:"
  178.         },
  179.         {30, 205, 46, 237},
  180.         EditText {
  181.             disabled,
  182.             ""
  183.         },
  184.         {30, 242, 46, 270},
  185.         StaticText {
  186.             disabled,
  187.             "To:"
  188.         },
  189.         {30, 272, 46, 304},
  190.         EditText {
  191.             disabled,
  192.             ""
  193.         },
  194.         {55, 5, 71, 89},
  195.         StaticText {
  196.             disabled,
  197.             "Copies:"
  198.         },
  199.         /* [11] */
  200.         {55, 95, 71, 127},
  201.         EditText {
  202.             disabled,
  203.             "1"
  204.         },
  205.         {55, 145, 71, 200},
  206.         StaticText {
  207.             disabled,
  208.             "Feed:"
  209.         },
  210.         {55, 205, 70, 303},
  211.         RadioButton {
  212.             enabled,
  213.             "Continuous"
  214.         },
  215.         {55, 305, 71, 425},
  216.         RadioButton {
  217.             enabled,
  218.             "Sheet Feed"
  219.         }
  220.     }
  221. };
  222.  
  223. resource 'DITL' (-8192, "Style Dialog Template") {
  224.     {
  225.         {44, 390, 64, 450},
  226.         Button {
  227.             enabled,
  228.             "OK"
  229.         },
  230.         {10, 390, 30, 450},
  231.         Button {
  232.             enabled,
  233.             "Cancel"
  234.         },
  235.         {10, 4, 30, 124},
  236.         StaticText {
  237.             disabled,
  238.             "DMP-110 v1.0"
  239.         },
  240.         {37, 66, 53, 120},
  241.         StaticText {
  242.             disabled,
  243.             "Style:"
  244.         },
  245.         {0, 0, 0, 0},
  246.         UserItem {
  247.             enabled
  248.         }
  249.     }
  250. };
  251.  
  252. resource 'DITL' (-8190, "Next Page Template") {
  253.     {
  254.         {30, 60, 46, 140},
  255.         Button {
  256.             enabled,
  257.             "Done"
  258.         },
  259.         {30, 160, 46, 240},
  260.         Button {
  261.             enabled,
  262.             "Stop"
  263.         },
  264.         {8, 8, 24, 120},
  265.         StaticText {
  266.             enabled,
  267.             Version
  268.         },
  269.         {8, 120, 24, 265},
  270.         StaticText {
  271.             enabled,
  272.             "Insert Next Sheet"
  273.         }
  274.     }
  275. };
  276.  
  277. resource 'DLOG' (-8191,"Job Dialog") {
  278.     {52, 16, 136, 492},
  279.     dBoxProc,
  280.     invisible,
  281.     noGoAway,
  282.     0x1,
  283.     -8191,
  284.     "Job"
  285. };
  286.  
  287. resource 'ICON' (-4080, "DMP-110") {
  288.     $"0000 0000 0000 0000 0000 0000 0000 0000"
  289.     $"0000 0000 0000 0000 0000 0000 007F 8000"
  290.     $"0040 C000 0040 A000 0040 9000 0040 F800"
  291.     $"0040 0800 0040 0800 0040 0800 0040 0800"
  292.     $"0040 0800 0040 0800 03FF FFC0 04AA AC20"
  293.     $"04D5 55A0 04AA ADA0 027F F840 0200 0040"
  294.     $"01FF FF80 0008 0400 0008 0400 0008 0400"
  295.     $"1E08 0E00 1FF0 1F00 1E00 1F00 0000 0A"
  296. };
  297.  
  298. resource 'DLOG' (-8192,"Style Dialog") {
  299.     {30, 20, 113, 488},
  300.     dBoxProc,
  301.     invisible,
  302.     noGoAway,
  303.     0x1,
  304.     -8192,
  305.     "Stl"
  306. };
  307.  
  308. resource 'DLOG' (-8190, "Next Page Box") {
  309.     {48, 51, 100, 330},
  310.     dBoxProc,
  311.     -1,
  312.     noGoAway,
  313.     0x0,
  314.     -8190,
  315.     "Next Page"
  316. };
  317. /*
  318.  * This Print Record provides 60 dpi in the printing portRect as
  319.  * seen by the application, and scales the image up to 120 dpi.
  320.  * It is useful in scaling up BitMaps to double the image size, or
  321.  * in word processing applications where text justification is
  322.  * needed.
  323.  */
  324. resource 'PREC' (0,"Default Scale") {
  325.     3,
  326.     0,
  327.     0,
  328.     60,
  329.     60,
  330.     {0, 0, 630, 480},
  331.     {-15, -15, 645, 495},
  332.     512,
  333.     1320,
  334.     1020,
  335.     0,
  336.     1,
  337.     0,
  338.     0,
  339.     120,
  340.     120,
  341.     {0, 0, 1260, 960},
  342.     /* TPrXInfo */
  343.     120,    /* rowBytes */
  344.     64, /* vertical dots */
  345.     959,    /* horizontal dots */
  346.     7680,   /* size of bit image */
  347.     20, /* bands per page */
  348.     0,  /* bPatScale */
  349.     1,  /* bUlThick */
  350.     1,  /* bUlOffset */
  351.     1,  /* bUlShadow */
  352.     0,  /* scanTB */
  353.     0,  /* unused */
  354.     1,
  355.     9999,
  356.     1,
  357.     0,
  358.     1,
  359.     0,0,
  360.     0,0,
  361.     0,
  362.     {
  363.         0,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  364.     }
  365. };
  366. /*
  367.  * The printing code puts a copy of the last-used
  368.  * Print Record here.
  369.  */
  370. resource 'PREC' (1,"Last Used Print Record") {
  371.     3,
  372.     0,
  373.     0,
  374.     80,
  375.     80,
  376.     {0, 0, 840, 640},
  377.     {-20, -20, 860, 660},
  378.     512,
  379.     1320,
  380.     1020,
  381.     0,
  382.     1,
  383.     0,
  384.     0,
  385.     120,
  386.     120,
  387.     {0, 0, 1260, 960},
  388.     /* TPrXInfo */
  389.     120,    /* rowBytes */
  390.     64, /* vertical dots */
  391.     959,    /* horizontal dots */
  392.     7680,   /* size of bit image */
  393.     20, /* bands per page */
  394.     0,  /* bPatScale */
  395.     1,  /* bUlThick */
  396.     1,  /* bUlOffset */
  397.     1,  /* bUlShadow */
  398.     0,  /* scanTB */
  399.     0,  /* unused */
  400.     1,
  401.     9999,
  402.     1,
  403.     0,
  404.     1,
  405.     0,0,
  406.     0,0,
  407.     0,
  408.     {
  409.         4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  410.     }
  411. };
  412. /*
  413.  * This Print Record causes a drawing program to reduce an object-
  414.  * oriented drawing by 33%, and allows us to fit a larger image
  415.  * on a single letter-sized sheet of paper.  If the application
  416.  * does not check the prStl.iPageV and prStl.iPageH fields, then
  417.  * the results are exactly the same as produced by "Exact BitMap."
  418.  */
  419. resource 'PREC' (2,"Shrink To Fit") {
  420.     3,
  421.     0,
  422.     0,
  423.     80,
  424.     80,
  425.     {0, 0, 1280, 960},
  426.     {-20, -30, 1300, 990},
  427.     512,
  428.     1980,
  429.     1530,
  430.     0,
  431.     1,
  432.     0,
  433.     0,
  434.     80,
  435.     80,
  436.     {0, 0, 1280, 960},
  437.     /* TPrXInfo */
  438.     120,    /* rowBytes */
  439.     64, /* vertical dots */
  440.     959,    /* horizontal dots */
  441.     7680,   /* size of bit image */
  442.     20, /* bands per page */
  443.     0,  /* bPatScale */
  444.     1,  /* bUlThick */
  445.     1,  /* bUlOffset */
  446.     1,  /* bUlShadow */
  447.     0,  /* scanTB */
  448.     0,  /* unused */
  449.     1,
  450.     9999,
  451.     1,
  452.     0,
  453.     1,
  454.     0,0,
  455.     0,0,
  456.     0,
  457.     {
  458.         2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  459.     }
  460. };
  461. /*
  462.  * This Print Record reflects the actual size of the printed
  463.  * image in dots.  There is a one-to-one correspondence between
  464.  * screen pixels and printed dots.  Best to use for painting
  465.  * programs, but the printed image will be smaller than what is
  466.  * seen on the screen.
  467.  */
  468. resource 'PREC' (3,"Exact BitMap") {
  469.     3,
  470.     0,
  471.     0,
  472.     120,
  473.     120,
  474.     {0, 0, 1280, 960},
  475.     {-20, -30, 1300, 990},
  476.     512,
  477.     1320,
  478.     1020,
  479.     0,
  480.     1,
  481.     0,
  482.     0,
  483.     120,
  484.     120,
  485.     {0, 0, 1280, 960},
  486.     /* TPrXInfo */
  487.     120,    /* rowBytes */
  488.     64, /* vertical dots */
  489.     959,    /* horizontal dots */
  490.     7680,   /* size of bit image */
  491.     20, /* bands per page */
  492.     0,  /* bPatScale */
  493.     1,  /* bUlThick */
  494.     1,  /* bUlOffset */
  495.     1,  /* bUlShadow */
  496.     0,  /* scanTB */
  497.     0,  /* unused */
  498.     1,
  499.     9999,
  500.     1,
  501.     0,
  502.     1,
  503.     0,0,
  504.     0,0,
  505.     0,
  506.     {
  507.         3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  508.     }
  509. };
  510. /*
  511.  * This Print Record gives a printing port resolution of 80 dpi,
  512.  * which is close to ImageWriter resolution and therefore close
  513.  * to what most Macintosh applications expect to see.  The problem
  514.  * with this 'PREC' is that the final image is scaled by a non-integral
  515.  * factor, and so text justification in word processing programs
  516.  * fails by a few bits width.
  517.  */
  518. resource 'PREC' (4,"Compatible") {
  519.     3,
  520.     0,
  521.     0,
  522.     80,
  523.     80,
  524.     {0, 0, 840, 640},
  525.     {-20, -20, 860, 660},
  526.     512,
  527.     1320,
  528.     1020,
  529.     0,
  530.     1,
  531.     0,
  532.     0,
  533.     120,
  534.     120,
  535.     {0, 0, 1260, 960},
  536.     /* TPrXInfo */
  537.     120,    /* rowBytes */
  538.     64, /* vertical dots */
  539.     959,    /* horizontal dots */
  540.     7680,   /* size of bit image */
  541.     20, /* bands per page */
  542.     0,  /* bPatScale */
  543.     1,  /* bUlThick */
  544.     1,  /* bUlOffset */
  545.     1,  /* bUlShadow */
  546.     0,  /* scanTB */
  547.     0,  /* unused */
  548.     1,
  549.     9999,
  550.     1,
  551.     0,
  552.     1,
  553.     0,0,
  554.     0,0,
  555.     0,
  556.     {
  557.         4,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
  558.     }
  559. };
  560.  
  561. resource 'STR#' (-4080, "Baud Rates") {
  562.        {
  563.         "300",
  564.         "600",
  565.         "1200",
  566.         "1800",
  567.         "2400",
  568.         "3600",
  569.         "4800",
  570.         "7200",
  571.         "9600",
  572.         "19200",
  573.         "57600"
  574.     }
  575. };
  576. resource 'DITL' (-4078, "ATalk Items") {
  577.     {
  578.         {139, 121, 159, 181},
  579.         Button {
  580.             enabled,
  581.             "OK"
  582.         },
  583.         {54, 11, 125, 294},
  584.         StaticText {
  585.             enabled,
  586.             "This printer cannot use the printer port now "
  587.             "because AppleTalk is active.  Please either "
  588.             "turn off AppleTalk, use the modem port "
  589.             "instead, or choose another printer."
  590.         },
  591.         {9, 235, 41, 267},
  592.         Icon {
  593.             enabled,
  594.             -4080
  595.         }
  596.     }
  597. };
  598.  
  599. resource 'DITL' (-4079, "Sys41 Items") {
  600.     {
  601.         {90, 137, 110, 197},
  602.         Button {
  603.             enabled,
  604.             "OK"
  605.         },
  606.         {56, 21, 76, 308},
  607.         StaticText {
  608.             enabled,
  609.             "This Printer requires System 4.1 or newer!"
  610.         },
  611.         {11, 274, 43, 306},
  612.         Icon {
  613.             enabled,
  614.             -4080
  615.         }
  616.     }
  617. };
  618.  
  619. resource 'ALRT' (-4079, "Sys41Alert") {
  620.     {40, 36, 164, 370},
  621.     -4079,
  622.     {
  623.         OK, visible, sound1,
  624.         OK, visible, sound1,
  625.         OK, visible, sound1,
  626.         OK, visible, sound1
  627.     }
  628. };
  629. resource 'ALRT' (-4078, "ATalk is on!") {
  630.     {48, 38, 216, 342},
  631.     -4078,
  632.     {
  633.         OK, visible, sound1,
  634.         OK, visible, sound1,
  635.         OK, visible, sound1,
  636.         OK, visible, sound1
  637.     }
  638. };
  639.  
  640.